package com.sh.caryr.erp.entity.enums;

import java.util.HashMap;
import java.util.Map;


public enum Page {

    DASHBOARD("dashboard"),
    PRODUCT("product"),
    PRODUCT_MAPPING("productMapping"),

    PAGE_USER("user"),
    PAGE_USER_ROLE("userRole"),
    PAGE_USER_AUTH("userAuthority"),
    PAGE_SHOP("shop"),
    PAGE_ORDERS("orders"),
    PAGE_AS_ORDERS("asOrders"),
    PAGE_ORDER_DETAILS("orderDetails"),
    PAGE_PRODUCT_ATTRIBUTE("proAttribute"),
    PAGE_MATERIAL("material"),
    PAGE_MATERIAL_COMB("materialComb"),
    PAGE_MATERIAL_COMB_STOCK("materialCombStock"),
    PAGE_SO_MAPPING("sOMapping"),
    PAGE_PRODUCT_COMB("productComb"),
    PAGE_PRODUCT_COMBITEM("productCombItem"),
    PAGE_PRODUCT_COMBSTOCK("productCombStock"),
    PAGE_STOCK("stock"),
    PAGE_STOCK_RECORD("skuRecord"),
    PAGE_STOCK_HIS("stockHis"),
    PAGE_ORDER_SAL("orderSal"),
    PAGE_ORDER_SAL_IMP("orderSalImp"),
    PAGE_ORDER_SYSTEMLOG("systemLog"),
    PAGE_ORDER_IMPORT("importTrades"),
    PAGE_ORDER_PURCH("orderPurch"),
    PAGE_USER_LOGIN("userLogin"),
    PAGE_CHANGE_LANG("change-lang");

    Page(String val) {
        this.val = val;
    }
    static Map<String, Page> map = new HashMap<>();
    static {
        for (Page p : Page.values()) {
            map.put(p.getVal(), p);
        }
    }

    String val;
    public String getVal() {
        return val;
    }
    public static boolean containsVal(String val) {
        return map.keySet().contains(val);
    }
}
